#define  _CRT_SECURE_NO_WARNINGS

#include "List.h"

void test1()
{
	LN* plist = NULL;
	plist = ListInit();
	ListPushBack(plist, 1);
	ListPushBack(plist, 2);
	ListPushBack(plist, 3);
	ListPushBack(plist, 4);
	ListPrint(plist);

	ListPushFront(plist, 0);
	ListPushFront(plist, -1);
	ListPrint(plist);

	ListPopFront(plist);
	ListPrint(plist);

	ListPopBack(plist);
	ListPrint(plist);
}

void test2()
{
	LN* plist = NULL;
	plist = ListInit();
	ListPushBack(plist, 1);
	ListPushBack(plist, 2);
	ListPushBack(plist, 3);
	ListPushBack(plist, 4);
	ListPrint(plist);

	LN* pos = ListFind(plist, 3);
	if (pos)
	{
		ListInsert(pos, 0);
	}
	ListPrint(plist);

	ListErase(pos);
	ListPrint(plist);
}
int main()
{
	test1();
	//test2();

	return 0;
}